package com.aoip.telemetry.telemetry.entity.element;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.time.LocalDateTime;

/**
 * @author chenbai
 * @version 1.0
 * @date 2021/7/12 3:14
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Builder
@TableName("element_config")
@ApiModel(description = "单个元素信息解析配置表")
public class ElementConfigEntity {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty("数据id")
    private String id;

    @TableField(value = "identifier_msg")
    @ApiModelProperty("单个元素标识符中文说明")
    private String identifierMsg;

    @TableField(value = "identifier_value")
    @ApiModelProperty("报文中标识符")
    private String identifierValue;

    @TableField(value = "coding_format")
    @ApiModelProperty("编码格式，bcd(10进制)，hex(16进制)")
    private String codingFormat;

    @ApiModelProperty(value = "整数位数")
    @TableField("integer_bit")
    private Integer integerBit;

    @ApiModelProperty(value = "小数点位数")
    @TableField("radix_point_bit")
    private Integer radixPointBit;
    
    @ApiModelProperty(value = "解析组专用(1：是，0：否)")
    @TableField("analysis_group_special")
    private Integer analysisGroupSpecial;

    @ApiModelProperty(value = "插入表名")
    @TableField("table_name")
    private String tableName;

    @TableField(value = "field_name")
    @ApiModelProperty("表字段名")
    private String fieldName;

    @TableField(value = "field_unit")
    @ApiModelProperty("字段单位")
    private String fieldUnit;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("修改时间")
    private LocalDateTime modifyTime;

    @TableField(value = "del_flag", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("删除标识")
    @TableLogic
    private Integer delFlag;


}
